#ifndef _TOOLFILEOPERATION_H
#define _TOOLFILEOPERATION_H

#ifdef SECUREAUTOBACKUP_EXPORTS
#define SECUREAUTOBACKUP_API __declspec(dllexport)
#else
#define SECUREAUTOBACKUP_API __declspec(dllimport)
#endif

#define TIME_STR_LENGTH 64

BOOL CheckFolderExist(CString& strPath);
BOOL CheckFileExist(const CString& strPath);
CString GetFilePath(CString& strPath);

BOOL DelFile(LPTSTR sFileName);
BOOL DelDirectory(LPTSTR sDirName);
BOOL MakeDirectory(LPTSTR sDirName);
BOOL MakeFullDirectory(LPTSTR sDirName);

BOOL CopyRecursively(CString& strFrom, CString& strTo);
BOOL IsSameSize(CString& strOld, CString& strNew);
BOOL IsSameFile(CString& strOld, CString& strNew);

BOOL IsNew(CString& strFile, CString& strOldTime);
BOOL IsNewer(CString& strFile, CString& strOldFile);
char* GetTimeString(char tmp[], tm* time);

extern "C"
{
    SECUREAUTOBACKUP_API int _stdcall TFO_MakeDirectory(char *);
    SECUREAUTOBACKUP_API int _stdcall TFO_DelDirectory(char *);
    SECUREAUTOBACKUP_API int _stdcall TFO_GetFilePath(char *, char *);
    SECUREAUTOBACKUP_API int _stdcall TFO_CheckFileExist(char *);
    SECUREAUTOBACKUP_API int _stdcall TFO_CheckFolderExist(char *);
}

#endif